package com.lianjinsu.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.lianjinsu.shop.repository.mapper.handler.GoodsListTypeHandler;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.type.Alias;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Getter
@Setter
@TableName("cart")
@Alias(value = "Cart")
public class Cart extends Model<Cart> {
    private static final long serialVersionUID = 7647452060045402363L;

    @TableId(type = IdType.INPUT)
    private String openid;

    @TableField(typeHandler = GoodsListTypeHandler.class)
    private List<Shop> shopList;

    private BigDecimal totalPrice;

    private LocalDateTime createTime;
}
